import { createApp } from 'vue'
import '@/main.css'
import App from '@/App.vue'
import router from '@/router'
import { createPinia } from 'pinia'
import { getUser } from './utils/storage'
import { useUserStore } from './store/user'

const app = createApp(App)
const pinia = createPinia()

app.use(router)
app.use(pinia)

let { setUserInfo } = useUserStore()
if(getUser()){
  setUserInfo(getUser())
}

app.mount('#app')
